package ldh.im.fxgui.controller.handler;

import javafx.collections.ObservableList;
import javafx.scene.Node;
import javafx.scene.layout.Pane;
import ldh.im.fxgui.component.UserMessagePane;
import ldh.im.fxbase.pojo.DbMessage;

import java.util.List;

public interface SendMessageHandler {

    Node createMessagePaneNode();

    void addMessage(DbMessage message);

    void addMessages(List<DbMessage> messages);

    default Pane createMessagePane(DbMessage textMessage) {
        UserMessagePane userMessagePane = new UserMessagePane(textMessage);
        return userMessagePane;
    }

    ObservableList<DbMessage> getItems();

}
